﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DesignPattern.ProxyPattern
{
    interface ISubject
    {
        void Request();
    }
    
    class Subject:ISubject
    {
        private string mm;
        public Subject(string mm)
        {
            this.mm = mm;
        }
        public void Request()
        {
            Console.WriteLine("{0}，这是送给你的礼物",mm);
        }
    }

    class Proxy:ISubject
    {
        private Subject subject;
        public Proxy(string mm)
        {
            subject = new Subject(mm);
        }

        public void Request()
        {
            subject.Request();
        }
    }
}
